<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            color: #fff;
            background-color: blue;
        }
    </style>
</head>
<body>
    <div id="sub-text">子应用内容</div>
    <script>
        window.a = 100 // 子应用不会影响到主应用
        console.log(window.a, 'sub.html');
        const subEle = document.querySelector('#sub-text')
        console.log(subEle);
    </script>
</body>
</html>